package Dao;

import java.util.List;



import org.hibernate.Query;
import org.hibernate.Session;



import tool.HibernateSessionFactory;

import Entity.Administer;

public class DaoLogin {
	
	@SuppressWarnings("unchecked")
     public List<Administer> login(){
    	 String sql ="";
    	 Session session =  HibernateSessionFactory.getSession();
    	 session.beginTransaction();
    	 sql="from Administer";
    	 Query query =session.createQuery(sql);
    	 List<Administer>  result =query.list();
    	 session.getTransaction().commit();
 		 session.close();
 		 System.out.println(result);
 		 return result;
    }
}